package tbdp.tool.util;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @author xbkaishui
 * @version $Id: VariableContext.java, v 0.1 2017-06-24 上午8:43 xbkaishui Exp $$
 */
public class VariableContext {

    private static final VariableContext instance = new VariableContext();
    private Map<String, String> ctx = new HashMap<>();

    private VariableContext() {
    }

    public static VariableContext instance() {
        return instance;
    }

    public void addVariable(String key, String value) {
        ctx.put(key, value);
    }

    public Map<String, String> getCtx() {
        return Collections.unmodifiableMap(ctx);
    }
}
